function generateTextboxes(option) {
    // 清空之前生成的文本框
    document.getElementById("textboxContainer").innerHTML = "";

    // 根据选项生成相应数量的文本框
    if(option === "强制退出其他设备") {

    }
    else if(option === "添加热门表情"){

    }
    else if(option === "移除热门表情"){

    }
    else if(option === "应用外消息通知设置"){
        var addRadio = document.createElement("input");
        addRadio.type = "radio";
        addRadio.id = "addOption";
        addRadio.name = "switch";
        addRadio.value = "1";
        var addLabel = document.createElement("label");
        addLabel.htmlFor = "addOption";
        addLabel.appendChild(document.createTextNode("打开"));
        textboxContainer.appendChild(addRadio);
        textboxContainer.appendChild(addLabel);

        var removeRadio = document.createElement("input");
        removeRadio.type = "radio";
        removeRadio.id = "removeOption";
        removeRadio.name = "switch";
        removeRadio.value = "0";
        var removeLabel = document.createElement("label");
        removeLabel.htmlFor = "removeOption";
        removeLabel.appendChild(document.createTextNode("关闭"));
        textboxContainer.appendChild(removeRadio);
        textboxContainer.appendChild(removeLabel);
    }
    else if(option === "应用内消息通知设置"){
        var addRadio = document.createElement("input");
        addRadio.type = "radio";
        addRadio.id = "addOption";
        addRadio.name = "switch";
        addRadio.value = "1";
        var addLabel = document.createElement("label");
        addLabel.htmlFor = "addOption";
        addLabel.appendChild(document.createTextNode("打开"));
        textboxContainer.appendChild(addRadio);
        textboxContainer.appendChild(addLabel);

        var removeRadio = document.createElement("input");
        removeRadio.type = "radio";
        removeRadio.id = "removeOption";
        removeRadio.name = "switch";
        removeRadio.value = "0";
        var removeLabel = document.createElement("label");
        removeLabel.htmlFor = "removeOption";
        removeLabel.appendChild(document.createTextNode("关闭"));
        textboxContainer.appendChild(removeRadio);
        textboxContainer.appendChild(removeLabel);
    }
    else if(option==="能否被添加好友"){
        var addRadio = document.createElement("input");
        addRadio.type = "radio";
        addRadio.id = "addOption";
        addRadio.name = "switch";
        addRadio.value = "1";
        var addLabel = document.createElement("label");
        addLabel.htmlFor = "addOption";
        addLabel.appendChild(document.createTextNode("打开"));
        textboxContainer.appendChild(addRadio);
        textboxContainer.appendChild(addLabel);

        var removeRadio = document.createElement("input");
        removeRadio.type = "radio";
        removeRadio.id = "removeOption";
        removeRadio.name = "switch";
        removeRadio.value = "0";
        var removeLabel = document.createElement("label");
        removeLabel.htmlFor = "removeOption";
        removeLabel.appendChild(document.createTextNode("关闭"));
        textboxContainer.appendChild(removeRadio);
        textboxContainer.appendChild(removeLabel);
    }
    else if(option==="对外在线状态展示"){
        var addRadio = document.createElement("input");
        addRadio.type = "radio";
        addRadio.id = "addOption";
        addRadio.name = "switch";
        addRadio.value = "1";
        var addLabel = document.createElement("label");
        addLabel.htmlFor = "addOption";
        addLabel.appendChild(document.createTextNode("打开"));
        textboxContainer.appendChild(addRadio);
        textboxContainer.appendChild(addLabel);

        var removeRadio = document.createElement("input");
        removeRadio.type = "radio";
        removeRadio.id = "removeOption";
        removeRadio.name = "switch";
        removeRadio.value = "0";
        var removeLabel = document.createElement("label");
        removeLabel.htmlFor = "removeOption";
        removeLabel.appendChild(document.createTextNode("关闭"));
        textboxContainer.appendChild(removeRadio);
        textboxContainer.appendChild(removeLabel);
    }
    else if(option==="谁能呼叫我"){
        var groupAndContacts = document.createElement("input");
        groupAndContacts.type = "radio";
        groupAndContacts.id = "groupAndContacts";
        groupAndContacts.name = "switch";
        groupAndContacts.value = "群组和联系人";
        var groupAndContactsLabel = document.createElement("label");
        groupAndContactsLabel.htmlFor = "groupAndContacts";
        groupAndContactsLabel.appendChild(document.createTextNode("群组和联系人"));
        textboxContainer.appendChild(groupAndContacts);
        textboxContainer.appendChild(groupAndContactsLabel);

        var contacts = document.createElement("input");
        contacts.type = "radio";
        contacts.id = "contacts";
        contacts.name = "switch";
        contacts.value = "联系人";
        var contactsLabel = document.createElement("label");
        contactsLabel.htmlFor = "contacts";
        contactsLabel.appendChild(document.createTextNode("联系人"));
        textboxContainer.appendChild(contacts);
        textboxContainer.appendChild(contactsLabel);

        var notAllow = document.createElement("input");
        notAllow.type = "radio";
        notAllow.id = "notAllow";
        notAllow.name = "switch";
        notAllow.value = "不允许任何人";
        var notAllowLabel = document.createElement("label");
        notAllowLabel.htmlFor = "notAllow";
        notAllowLabel.appendChild(document.createTextNode("不允许任何人"));
        textboxContainer.appendChild(notAllow);
        textboxContainer.appendChild(notAllowLabel);
    }
    else if(option==="转发我消息附带我的账号链接"){
        var groupAndContacts = document.createElement("input");
        groupAndContacts.type = "radio";
        groupAndContacts.id = "groupAndContacts";
        groupAndContacts.name = "switch";
        groupAndContacts.value = "所有人";
        var groupAndContactsLabel = document.createElement("label");
        groupAndContactsLabel.htmlFor = "groupAndContacts";
        groupAndContactsLabel.appendChild(document.createTextNode("所有人"));
        textboxContainer.appendChild(groupAndContacts);
        textboxContainer.appendChild(groupAndContactsLabel);

        var contacts = document.createElement("input");
        contacts.type = "radio";
        contacts.id = "contacts";
        contacts.name = "switch";
        contacts.value = "联系人";
        var contactsLabel = document.createElement("label");
        contactsLabel.htmlFor = "contacts";
        contactsLabel.appendChild(document.createTextNode("联系人"));
        textboxContainer.appendChild(contacts);
        textboxContainer.appendChild(contactsLabel);

        var notAllow = document.createElement("input");
        notAllow.type = "radio";
        notAllow.id = "notAllow";
        notAllow.name = "switch";
        notAllow.value = "不允许任何人";
        var notAllowLabel = document.createElement("label");
        notAllowLabel.htmlFor = "notAllow";
        notAllowLabel.appendChild(document.createTextNode("不允许任何人"));
        textboxContainer.appendChild(notAllow);
        textboxContainer.appendChild(notAllowLabel);
    }
    else if(option==="谁能看到我真实头像"){
        var groupAndContacts = document.createElement("input");
        groupAndContacts.type = "radio";
        groupAndContacts.id = "groupAndContacts";
        groupAndContacts.name = "switch";
        groupAndContacts.value = "群组和联系人";
        var groupAndContactsLabel = document.createElement("label");
        groupAndContactsLabel.htmlFor = "groupAndContacts";
        groupAndContactsLabel.appendChild(document.createTextNode("群组和联系人"));
        textboxContainer.appendChild(groupAndContacts);
        textboxContainer.appendChild(groupAndContactsLabel);

        var contacts = document.createElement("input");
        contacts.type = "radio";
        contacts.id = "contacts";
        contacts.name = "switch";
        contacts.value = "联系人";
        var contactsLabel = document.createElement("label");
        contactsLabel.htmlFor = "contacts";
        contactsLabel.appendChild(document.createTextNode("联系人"));
        textboxContainer.appendChild(contacts);
        textboxContainer.appendChild(contactsLabel);

        var notAllow = document.createElement("input");
        notAllow.type = "radio";
        notAllow.id = "notAllow";
        notAllow.name = "switch";
        notAllow.value = "不允许任何人";
        var notAllowLabel = document.createElement("label");
        notAllowLabel.htmlFor = "notAllow";
        notAllowLabel.appendChild(document.createTextNode("不允许任何人"));
        textboxContainer.appendChild(notAllow);
        textboxContainer.appendChild(notAllowLabel);
    }
    else if(option==="软件锁屏密码设置"){
        var textbox1 = document.createElement("input");
        textbox1.setAttribute("type", "text");
        textbox1.setAttribute("placeholder", "输入6位数字锁屏密码");
        textbox1.setAttribute("name", "password");
        document.getElementById("textboxContainer").appendChild(textbox1);

        var addRadio = document.createElement("input");
        addRadio.type = "radio";
        addRadio.id = "addOption";
        addRadio.name = "switch";
        addRadio.value = "1";
        var addLabel = document.createElement("label");
        addLabel.htmlFor = "addOption";
        addLabel.appendChild(document.createTextNode("打开"));
        textboxContainer.appendChild(addRadio);
        textboxContainer.appendChild(addLabel);

        var removeRadio = document.createElement("input");
        removeRadio.type = "radio";
        removeRadio.id = "removeOption";
        removeRadio.name = "switch";
        removeRadio.value = "0";
        var removeLabel = document.createElement("label");
        removeLabel.htmlFor = "removeOption";
        removeLabel.appendChild(document.createTextNode("关闭"));
        textboxContainer.appendChild(removeRadio);
        textboxContainer.appendChild(removeLabel);
    }
    else if(option==="修改锁屏密码"){
        var textbox1 = document.createElement("input");
        textbox1.setAttribute("type", "text");
        textbox1.setAttribute("placeholder", "输入旧锁屏密码");
        textbox1.setAttribute("name", "oldPassword");
        document.getElementById("textboxContainer").appendChild(textbox1);

        var textbox2 = document.createElement("input");
        textbox2.setAttribute("type", "text");
        textbox2.setAttribute("placeholder", "输入新锁屏密码");
        textbox2.setAttribute("name", "newPassword");
        document.getElementById("textboxContainer").appendChild(textbox2);
    }
    else if(option==="设置登出密码（输入后会销毁账号）"){
        var textbox1 = document.createElement("input");
        textbox1.setAttribute("type", "text");
        textbox1.setAttribute("placeholder", "输入锁屏密码");
        textbox1.setAttribute("name", "lockPassword");
        document.getElementById("textboxContainer").appendChild(textbox1);

        var textbox2 = document.createElement("input");
        textbox2.setAttribute("type", "text");
        textbox2.setAttribute("placeholder", "输入登出账号密码");
        textbox2.setAttribute("name", "outPassword");
        document.getElementById("textboxContainer").appendChild(textbox2);
    }
    else if(option==="修改登出密码"){
        var textbox1 = document.createElement("input");
        textbox1.setAttribute("type", "text");
        textbox1.setAttribute("placeholder", "输入锁屏密码");
        textbox1.setAttribute("name", "lockPassword");
        document.getElementById("textboxContainer").appendChild(textbox1);

        var textbox2 = document.createElement("input");
        textbox2.setAttribute("type", "text");
        textbox2.setAttribute("placeholder", "输入修改的登出账号密码");
        textbox2.setAttribute("name", "outPasswordChange");
        document.getElementById("textboxContainer").appendChild(textbox2);
    }
    else if(option==="修改pin码"){
        var textbox1 = document.createElement("input");
        textbox1.setAttribute("type", "text");
        textbox1.setAttribute("placeholder", "输入旧pin码");
        textbox1.setAttribute("name", "oldPin");
        document.getElementById("textboxContainer").appendChild(textbox1);

        var textbox2 = document.createElement("input");
        textbox2.setAttribute("type", "text");
        textbox2.setAttribute("placeholder", "输入新pin码");
        textbox2.setAttribute("name", "newPin");
        document.getElementById("textboxContainer").appendChild(textbox2);
    }
    else if(option==="切换app的时候遮挡窗口"){
        var addRadio = document.createElement("input");
        addRadio.type = "radio";
        addRadio.id = "addOption";
        addRadio.name = "switch";
        addRadio.value = "1";
        var addLabel = document.createElement("label");
        addLabel.htmlFor = "addOption";
        addLabel.appendChild(document.createTextNode("打开"));
        textboxContainer.appendChild(addRadio);
        textboxContainer.appendChild(addLabel);

        var removeRadio = document.createElement("input");
        removeRadio.type = "radio";
        removeRadio.id = "removeOption";
        removeRadio.name = "switch";
        removeRadio.value = "0";
        var removeLabel = document.createElement("label");
        removeLabel.htmlFor = "removeOption";
        removeLabel.appendChild(document.createTextNode("关闭"));
        textboxContainer.appendChild(removeRadio);
        textboxContainer.appendChild(removeLabel);
    }
    else if(option==="网络检查设置"){
        var addRadio = document.createElement("input");
        addRadio.type = "radio";
        addRadio.id = "addOption";
        addRadio.name = "switch";
        addRadio.value = "1";
        var addLabel = document.createElement("label");
        addLabel.htmlFor = "addOption";
        addLabel.appendChild(document.createTextNode("打开"));
        textboxContainer.appendChild(addRadio);
        textboxContainer.appendChild(addLabel);

        var removeRadio = document.createElement("input");
        removeRadio.type = "radio";
        removeRadio.id = "removeOption";
        removeRadio.name = "switch";
        removeRadio.value = "0";
        var removeLabel = document.createElement("label");
        removeLabel.htmlFor = "removeOption";
        removeLabel.appendChild(document.createTextNode("关闭"));
        textboxContainer.appendChild(removeRadio);
        textboxContainer.appendChild(removeLabel);
    }
    else if(option==="清除缓存"){
        var addRadio = document.createElement("input");
        addRadio.type = "radio";
        addRadio.id = "addOption";
        addRadio.name = "switch";
        addRadio.value = "1";
        var addLabel = document.createElement("label");
        addLabel.htmlFor = "addOption";
        addLabel.appendChild(document.createTextNode("打开"));
        textboxContainer.appendChild(addRadio);
        textboxContainer.appendChild(addLabel);

        var removeRadio = document.createElement("input");
        removeRadio.type = "radio";
        removeRadio.id = "removeOption";
        removeRadio.name = "switch";
        removeRadio.value = "0";
        var removeLabel = document.createElement("label");
        removeLabel.htmlFor = "removeOption";
        removeLabel.appendChild(document.createTextNode("关闭"));
        textboxContainer.appendChild(removeRadio);
        textboxContainer.appendChild(removeLabel);
    }
}






//最外层的路径地址
function onChangeDropdown() {
    var select = document.getElementById("dropdown");
    var selectedOption = select.options[select.selectedIndex].text;
    generateTextboxes(selectedOption);

    // 根据选择的选项动态设置表单的action属性
    var form = document.getElementById("myForm");
    form.method="post";
    if (selectedOption === "强制退出其他设备") {
        form.action = "/exit/exitdevice";
    }
    else if (selectedOption === "添加热门表情") {
        form.action = "/mysticker/addsticker";
    }
    else if (selectedOption === "移除热门表情") {
        form.action = "/mysticker/deletesticker";
    }
    else if (selectedOption === "应用外消息通知设置") {
        form.action = "/notifications/externalnotification";
    }
    else if (selectedOption === "应用内消息通知设置") {
        form.action = "/notifications/internalnotice";
    }
    else if (selectedOption === "能否被添加好友") {
        form.action = "/prvacysecurity/addway";
    }
    else if (selectedOption === "对外在线状态展示") {
        form.action = "/prvacysecurity/onlinedisplay";
    }
    else if (selectedOption === "谁能呼叫我") {
        form.action = "/prvacysecurity/callme";
    }
    else if (selectedOption === "转发我消息附带我的账号链接") {
        form.action = "/prvacysecurity/forwardmessage";
    }
    else if (selectedOption === "谁能看到我真实头像") {
        form.action = "/prvacysecurity/realpicture";
    }
    else if (selectedOption === "软件锁屏密码设置") {
        form.action = "/prvacysecurity/locksetting";
    }
    else if (selectedOption === "修改锁屏密码") {
        form.action = "/prvacysecurity/passwordchange";
    }
    else if (selectedOption === "设置登出密码（输入后会销毁账号）") {
        form.action = "/prvacysecurity/logoutaccount";
    }
    else if (selectedOption === "修改登出密码") {
        form.action = "/prvacysecurity/logoutaccountchange";
    }
    else if (selectedOption === "修改pin码") {
        form.action = "/prvacysecurity/pinchange";
    }
    else if (selectedOption === "切换app的时候遮挡窗口") {
        form.action = "/prvacysecurity/switchapp";
    }
    else if (selectedOption === "切网络检查设置") {
        form.action = "/prvacysecurity/networkcheck";
    }
    else if (selectedOption === "清除缓存") {
        form.action = "/prvacysecurity/networkcheck";
    }
}


